#include <iostream>
#include "smart_pointer.hpp"

using namespace std;


class Test {
public:
    Test() {
        cout << "Test()" << endl;
    }

    ~Test() {
        cout << "~Test()" << endl;
    }
};


int main(int argc, char *argv[]) {

    EEQLib::SmartPointer<Test> test = new Test();
    EEQLib::SmartPointer<Test> test2;
    test2 = test;


    cout << "test2 is " << test2.isNull() << endl;
    cout << "test is " << test.isNull() << endl << endl;
    
    // test2++; /* 执行指针移动操作时出现错误 */
    return 0;
}
